import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '../src/assets/commonCss/index.css'

import ElementPlus from 'element-plus';


import 'element-plus/lib/theme-chalk/index.css';

const app = createApp(App)
app.use(store)
app.use(router)
app.use(ElementPlus)
// 引入vue-amap
import VueAMap from 'vue-amap'

import qs from "qs";
// 初始化vue-amap
// VueAMap.initAMapApiLoader({
//     // 高德的key
//     key: 'fde46755f8c15b2ce9a1683761870916',
//     // 插件集合
//     plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
//     // 高德 sdk 版本，默认为 1.4.4
//     v: '1.4.4'
// });
import {
    clos_encryptDes,
    time,
    jseEncryption,
    jseDecrypt
} from "./encryption.js";

//sha1加密
app.config.globalProperties.clos_encryptDes = clos_encryptDes;
//jsencrypt加密
app.config.globalProperties.jseEncryption = jseEncryption;
//jsencrypt解密
app.config.globalProperties.jseDecrypt = jseDecrypt;
//生成当前时间毫秒数
app.config.globalProperties.time = time;

app.config.globalProperties.$qs = qs
app.config.productionTip = false
app.use(VueAMap)
console.log(VueAMap)
app.mount('#app')
// 跳转后返回顶部
router.afterEach((to,from,next) => {
    window.scrollTo(0,0);
})



